Visualization Tutorial

Library Official Site
Matplotlib link
Plotly link
Seaborn link

Matplotlib Tutorial

Matplotlib Logo

Line Graph¶

This is a line graph created by x, y values.

In [1]:
import matplotlib.pyplot as plt

fig, ax = plt.subplots()  # Create a figure containing a single axes.
ax.plot([1, 2, 3, 4,5], [1, 4, 10, 3,-15])  # Plot some data on the axes.
Out[1]:
[<matplotlib.lines.Line2D at 0x1d3fc77e610>]

Plotly Tutorial

Plotly Logo

In [2]:
import plotly.express as px
import plotly.offline as po

po.offline.init_notebook_mode()

Scatter¶

This is a scatter plot of the given data.

In [3]:
df = px.data.iris()
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="species",
                 size='petal_length', hover_data=['petal_width'])
fig.show()

Seaborn Tutorial

Seaborn Logo

Supported Plots¶

Plot Example
scattorplot link
lineplot link
... ...

Line Chart¶

This is a line chart created by given data.

In [4]:
import seaborn as sns
sns.set_theme(style="darkgrid")
In [5]:
# Load an example dataset with long-form data
fmri = sns.load_dataset("fmri")

# Plot the responses for different events and regions
sns.lineplot(x="timepoint", y="signal",
             hue="region", style="event",
             data=fmri)
Out[5]:
<Axes: xlabel='timepoint', ylabel='signal'>